package com.source.sys.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.sql.Blob;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 
 * </p>
 *
 * @author ZZF
 * @since 2021-02-08
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("sys_user")
@ApiModel(value="用户信息", description="")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "userId", type = IdType.ASSIGN_ID)
    private String userId;

    @ApiModelProperty(value = "用户名")
    @TableField("loginName")
    private String loginName;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "电话")
    private String phone;

    @ApiModelProperty(value = "手机")
    private String mobile;

    @ApiModelProperty(value = "性别")
    private String gender;

    @ApiModelProperty(value = "ID卡编号")
    @TableField("idCode")
    private String idCode;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "createDate",fill = FieldFill.INSERT)
    private Date createDate;

    @ApiModelProperty(value = "更新者")
    @TableField("updateBy")
    private String updateBy;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "updateDate",fill = FieldFill.UPDATE)
    private Date updateDate;

    @ApiModelProperty(value = "qq号")
    private String qq;

    @ApiModelProperty(value = "状态（在职、离职）")
    private String status;

    @ApiModelProperty(value = "微信号")
    private String wechat;

    @ApiModelProperty(value = "二维码相对路径")
    @TableField("wechatCode")
    private String wechatCode;

    @ApiModelProperty(value = "二维码解码")
    @TableField("wechatCodeDecode")
    private String wechatCodeDecode;

    @ApiModelProperty(value = "逻辑删除")
    @TableField(value = "isDelete",fill = FieldFill.INSERT)
    @TableLogic
    private Boolean isDelete;

    @ApiModelProperty(value = "静态码解码")
    @TableField("staticDecode")
    private String staticDecode;

    @ApiModelProperty("加密salt")
    private String salt;

    public User(String loginName,String password,String email){
        this.loginName = loginName;
        this.password = password;
        this.email = email;
    }

    public User(String loginName,String password,String email,String salt){
        this.loginName = loginName;
        this.password = password;
        this.email = email;
        this.salt = salt;
    }


}
